<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>flex列表学习</title>
    <style>
        .container{
            width: 1000px;
            margin:0 auto;
        }
        .flex-list{
            display: flex;
           
           justify-content: space-around; /* 间隔均衡 */
           justify-content: space-between; /* 两边对齐 */
           justify-content: space-evenly; /* 间隔均衡 */
            flex-wrap: wrap;
            margin: 0;
            padding: 0;
        }
        .flex-list li{
            width: 30%;
            background-color: #7bed9f;
            border: 1px solid #2ed573;
            height: 300px;
            list-style-type: none;
            margin-bottom:20px;
        }
        .flex-list i{
            width: 30%;
        }

        /* 最后一行向左对齐的问题：
        1.如果使用space between或者 space around
            最后一行通过一个空元素填满（通过Js或者判断语法）
        2.
        */
    </style>
</head>
<body>
    <section>
        <h2>3列</h2>
        <div class="container">

        </div>
        <ul class="flex-list">
            <li><div>a</div></li>
            <li><div>a</div></li>
            <li><div>a</div></li>
            <li><div>a</div></li>
            <li><div>a</div></li>
            <i></i>
        </ul>
    </section>
</body>
</html>